<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>PhysiTrack: D:/physi-tracklast/01/Android/PhysiTrack/src/graphview/GraphView.java Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">PhysiTrack
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">D:/physi-tracklast/01/Android/PhysiTrack/src/graphview/GraphView.java</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_graph_view_8java.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00002"></a>00002 <span class="keyword">package </span>graphview;
<a name="l00003"></a>00003 
<a name="l00004"></a>00004 <span class="keyword">import</span> java.text.NumberFormat;
<a name="l00005"></a>00005 <span class="keyword">import</span> java.util.ArrayList;
<a name="l00006"></a>00006 <span class="keyword">import</span> java.util.List;
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="keyword">import</span> android.content.Context;
<a name="l00009"></a>00009 <span class="keyword">import</span> android.graphics.Canvas;
<a name="l00010"></a>00010 <span class="keyword">import</span> android.graphics.Color;
<a name="l00011"></a>00011 <span class="keyword">import</span> android.graphics.Paint;
<a name="l00012"></a>00012 <span class="keyword">import</span> android.graphics.Paint.Align;
<a name="l00013"></a>00013 <span class="keyword">import</span> android.graphics.RectF;
<a name="l00014"></a>00014 <span class="keyword">import</span> android.view.MotionEvent;
<a name="l00015"></a>00015 <span class="keyword">import</span> android.view.View;
<a name="l00016"></a>00016 <span class="keyword">import</span> android.widget.LinearLayout;
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="keyword">import</span> graphview.compatible.ScaleGestureDetector;
<a name="l00019"></a>00019 
<a name="l00031"></a><a class="code" href="classgraphview_1_1_graph_view.html">00031</a> <span class="keyword">abstract</span> <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="classgraphview_1_1_graph_view.html">GraphView</a> <span class="keyword">extends</span> LinearLayout {
<a name="l00032"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html">00032</a>         <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">private</span> <span class="keyword">class </span><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html">GraphViewConfig</a> {
<a name="l00033"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html#a142a28a70c5c65464717637b33f6252a">00033</a>                 <span class="keyword">static</span> <span class="keyword">final</span> <span class="keywordtype">float</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html#a142a28a70c5c65464717637b33f6252a">BORDER</a> = 20;
<a name="l00034"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html#a9b1a2b01ca81fda50d10847bd23ca259">00034</a>                 <span class="keyword">static</span> <span class="keyword">final</span> <span class="keywordtype">float</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html#a9b1a2b01ca81fda50d10847bd23ca259">VERTICAL_LABEL_WIDTH</a> = 100;
<a name="l00035"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html#a51424eb091b33de68ee07bda8eae25de">00035</a>                 <span class="keyword">static</span> <span class="keyword">final</span> <span class="keywordtype">float</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html#a51424eb091b33de68ee07bda8eae25de">HORIZONTAL_LABEL_HEIGHT</a> = 80;
<a name="l00036"></a>00036         }
<a name="l00037"></a>00037 
<a name="l00038"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html">00038</a>         <span class="keyword">private</span> <span class="keyword">class </span><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html">GraphViewContentView</a> <span class="keyword">extends</span> View {
<a name="l00039"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#ac8dfd841c554850efc69a003c9913341">00039</a>                 <span class="keyword">private</span> <span class="keywordtype">float</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#ac8dfd841c554850efc69a003c9913341">lastTouchEventX</a>;
<a name="l00040"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#a5d280df7da9a526ecb7cb288d0cbd304">00040</a>                 <span class="keyword">private</span> <span class="keywordtype">float</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#a5d280df7da9a526ecb7cb288d0cbd304">graphwidth</a>;
<a name="l00041"></a>00041 
<a name="l00045"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#ae1c607650a1ebc8689aa567369e39b50">00045</a>                 <span class="keyword">public</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#ae1c607650a1ebc8689aa567369e39b50">GraphViewContentView</a>(Context context) {
<a name="l00046"></a>00046                         super(context);
<a name="l00047"></a>00047                         setLayoutParams(<span class="keyword">new</span> LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
<a name="l00048"></a>00048                 }
<a name="l00049"></a>00049 
<a name="l00053"></a>00053                 @Override
<a name="l00054"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#a1201f565e8eaa8c62668a4c57c1ce656">00054</a>                 <span class="keyword">protected</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#a1201f565e8eaa8c62668a4c57c1ce656">onDraw</a>(Canvas canvas) {
<a name="l00055"></a>00055 
<a name="l00056"></a>00056             <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setAntiAlias(<span class="keyword">true</span>);
<a name="l00057"></a>00057 
<a name="l00058"></a>00058                         <span class="comment">// normal</span>
<a name="l00059"></a>00059                         <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setStrokeWidth(0);
<a name="l00060"></a>00060 
<a name="l00061"></a>00061                         <span class="keywordtype">float</span> border = <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html">GraphViewConfig</a>.<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html#a142a28a70c5c65464717637b33f6252a">BORDER</a>;
<a name="l00062"></a>00062                         <span class="keywordtype">float</span> horstart = 0;
<a name="l00063"></a>00063                         <span class="keywordtype">float</span> height = getHeight();
<a name="l00064"></a>00064                         <span class="keywordtype">float</span> width = getWidth() - 1;
<a name="l00065"></a>00065                         <span class="keywordtype">double</span> maxY = <a class="code" href="classgraphview_1_1_graph_view.html#a9e17e92e3a8ff90d95a5cfe4cdc66d25">getMaxY</a>();
<a name="l00066"></a>00066                         <span class="keywordtype">double</span> minY = <a class="code" href="classgraphview_1_1_graph_view.html#aab2766972f8d4f59dc697174fcd4e49d">getMinY</a>();
<a name="l00067"></a>00067                         <span class="keywordtype">double</span> diffY = maxY - minY;
<a name="l00068"></a>00068                         <span class="keywordtype">double</span> maxX = <a class="code" href="classgraphview_1_1_graph_view.html#a43a2733e75e304a60650a2dcc9208d17">getMaxX</a>(<span class="keyword">false</span>);
<a name="l00069"></a>00069                         <span class="keywordtype">double</span> minX = <a class="code" href="classgraphview_1_1_graph_view.html#a4b659a680581f1c98b18639744cc59ef">getMinX</a>(<span class="keyword">false</span>);
<a name="l00070"></a>00070                         <span class="keywordtype">double</span> diffX = maxX - minX;
<a name="l00071"></a>00071                         <span class="keywordtype">float</span> graphheight = height - (2 * border);
<a name="l00072"></a>00072                         <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#a5d280df7da9a526ecb7cb288d0cbd304">graphwidth</a> = width;
<a name="l00073"></a>00073 
<a name="l00074"></a>00074                         <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#a8e3d1831fdbbbb17329996a6db6834e3">horlabels</a> == null) {
<a name="l00075"></a>00075                                 <a class="code" href="classgraphview_1_1_graph_view.html#a8e3d1831fdbbbb17329996a6db6834e3">horlabels</a> = <a class="code" href="classgraphview_1_1_graph_view.html#aee71a390d7ad9c1a385dfd44027ed92f">generateHorlabels</a>(graphwidth);
<a name="l00076"></a>00076                         }
<a name="l00077"></a>00077                         <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a> == null) {
<a name="l00078"></a>00078                                 <a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a> = <a class="code" href="classgraphview_1_1_graph_view.html#a461bd90d6d23ffe2f2f8f2af9f9108fb">generateVerlabels</a>(graphheight);
<a name="l00079"></a>00079                         }
<a name="l00080"></a>00080 
<a name="l00081"></a>00081                         <span class="comment">// vertical lines</span>
<a name="l00082"></a>00082                         <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setTextAlign(Align.LEFT);
<a name="l00083"></a>00083                         <span class="keywordtype">int</span> vers = <a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a>.length - 1;
<a name="l00084"></a>00084                         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a>.length; i++) {
<a name="l00085"></a>00085                                 <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setColor(Color.DKGRAY);
<a name="l00086"></a>00086                                 <span class="keywordtype">float</span> y = ((graphheight / vers) * i) + border;
<a name="l00087"></a>00087                                 canvas.drawLine(horstart, y, width, y, <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>);
<a name="l00088"></a>00088                         }
<a name="l00089"></a>00089 
<a name="l00090"></a>00090                         <span class="comment">// horizontal labels + lines</span>
<a name="l00091"></a>00091                         <span class="keywordtype">int</span> hors = <a class="code" href="classgraphview_1_1_graph_view.html#a8e3d1831fdbbbb17329996a6db6834e3">horlabels</a>.length - 1;
<a name="l00092"></a>00092                         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="classgraphview_1_1_graph_view.html#a8e3d1831fdbbbb17329996a6db6834e3">horlabels</a>.length; i++) {
<a name="l00093"></a>00093                                 <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setColor(Color.DKGRAY);
<a name="l00094"></a>00094                                 <span class="keywordtype">float</span> x = ((graphwidth / hors) * i) + horstart;
<a name="l00095"></a>00095                                 canvas.drawLine(x, height - border, x, border, <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>);
<a name="l00096"></a>00096                                 <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setTextAlign(Align.CENTER);
<a name="l00097"></a>00097                                 <span class="keywordflow">if</span> (i==<a class="code" href="classgraphview_1_1_graph_view.html#a8e3d1831fdbbbb17329996a6db6834e3">horlabels</a>.length-1)
<a name="l00098"></a>00098                                         <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setTextAlign(Align.RIGHT);
<a name="l00099"></a>00099                                 <span class="keywordflow">if</span> (i==0)
<a name="l00100"></a>00100                                         <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setTextAlign(Align.LEFT);
<a name="l00101"></a>00101                                 <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setColor(Color.WHITE);
<a name="l00102"></a>00102                                 canvas.drawText(<a class="code" href="classgraphview_1_1_graph_view.html#a8e3d1831fdbbbb17329996a6db6834e3">horlabels</a>[i], x, height - 4, <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>);
<a name="l00103"></a>00103                         }
<a name="l00104"></a>00104 
<a name="l00105"></a>00105                         <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setTextAlign(Align.CENTER);
<a name="l00106"></a>00106                         canvas.drawText(<a class="code" href="classgraphview_1_1_graph_view.html#a20903413edf006c4b5eafca915389f0e">title</a>, (graphwidth / 2) + horstart, border - 4, <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>);
<a name="l00107"></a>00107 
<a name="l00108"></a>00108                         <span class="keywordflow">if</span> (maxY != minY) {
<a name="l00109"></a>00109                                 <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setStrokeCap(Paint.Cap.ROUND);
<a name="l00110"></a>00110                                 <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setStrokeWidth(3);
<a name="l00111"></a>00111 
<a name="l00112"></a>00112                                 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;<a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.size(); i++) {
<a name="l00113"></a>00113                                         <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setColor(<a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.get(i).color);
<a name="l00114"></a>00114                                         <a class="code" href="classgraphview_1_1_graph_view.html#a470fe04d7c98c94c35ea5375a7de9a17">drawSeries</a>(canvas, <a class="code" href="classgraphview_1_1_graph_view.html#acb3611c6adeab5291ee5d6ca1b25f834">_values</a>(i), graphwidth, graphheight, border, minX, minY, diffX, diffY, horstart);
<a name="l00115"></a>00115                                 }
<a name="l00116"></a>00116 
<a name="l00117"></a>00117                                 <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#a13cba437e2313251e0cd99c71dae3273">showLegend</a>) <a class="code" href="classgraphview_1_1_graph_view.html#a3030d5c910f0386b8c5b1d07f7749694">drawLegend</a>(canvas, height, width);
<a name="l00118"></a>00118                         }
<a name="l00119"></a>00119                 }
<a name="l00120"></a>00120 
<a name="l00121"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#a80d4ade40ed3cbf17963fff3a7350090">00121</a>                 <span class="keyword">private</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#a80d4ade40ed3cbf17963fff3a7350090">onMoveGesture</a>(<span class="keywordtype">float</span> f) {
<a name="l00122"></a>00122                         <span class="comment">// view port update</span>
<a name="l00123"></a>00123                         <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">viewportSize</a> != 0) {
<a name="l00124"></a>00124                                 <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a> -= f*<a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">viewportSize</a>/<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#a5d280df7da9a526ecb7cb288d0cbd304">graphwidth</a>;
<a name="l00125"></a>00125 
<a name="l00126"></a>00126                                 <span class="comment">// minimal and maximal view limit</span>
<a name="l00127"></a>00127                                 <span class="keywordtype">double</span> minX = <a class="code" href="classgraphview_1_1_graph_view.html#a4b659a680581f1c98b18639744cc59ef">getMinX</a>(<span class="keyword">true</span>);
<a name="l00128"></a>00128                                 <span class="keywordtype">double</span> maxX = <a class="code" href="classgraphview_1_1_graph_view.html#a43a2733e75e304a60650a2dcc9208d17">getMaxX</a>(<span class="keyword">true</span>);
<a name="l00129"></a>00129                                 <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a> &lt; minX) {
<a name="l00130"></a>00130                                         <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a> = minX;
<a name="l00131"></a>00131                                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a>+<a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">viewportSize</a> &gt; maxX) {
<a name="l00132"></a>00132                                         <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a> = maxX - <a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">viewportSize</a>;
<a name="l00133"></a>00133                                 }
<a name="l00134"></a>00134 
<a name="l00135"></a>00135                                 <span class="comment">// labels have to be regenerated</span>
<a name="l00136"></a>00136                                 <a class="code" href="classgraphview_1_1_graph_view.html#a8e3d1831fdbbbb17329996a6db6834e3">horlabels</a> = null;
<a name="l00137"></a>00137                                 <a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a> = null;
<a name="l00138"></a>00138                                 <a class="code" href="classgraphview_1_1_graph_view.html#ad76601c96b925b39020b1d0dac63561f">viewVerLabels</a>.invalidate();
<a name="l00139"></a>00139                         }
<a name="l00140"></a>00140                         invalidate();
<a name="l00141"></a>00141                 }
<a name="l00142"></a>00142 
<a name="l00146"></a>00146                 @Override
<a name="l00147"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#a758c0d06a01a531971ae3571dad7333e">00147</a>                 <span class="keyword">public</span> <span class="keywordtype">boolean</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#a758c0d06a01a531971ae3571dad7333e">onTouchEvent</a>(MotionEvent event) {
<a name="l00148"></a>00148                         <span class="keywordflow">if</span> (!<a class="code" href="classgraphview_1_1_graph_view.html#a51e7d6a7ebf2c0883a75420be5c29284">isScrollable</a>()) {
<a name="l00149"></a>00149                                 <span class="keywordflow">return</span> super.onTouchEvent(event);
<a name="l00150"></a>00150                         }
<a name="l00151"></a>00151 
<a name="l00152"></a>00152                         <span class="keywordtype">boolean</span> handled = <span class="keyword">false</span>;
<a name="l00153"></a>00153                         <span class="comment">// first scale</span>
<a name="l00154"></a>00154                         <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#a29f48e76fa74884851c00e2f134fa480">scalable</a> &amp;&amp; <a class="code" href="classgraphview_1_1_graph_view.html#adff1b740a07c0dca98189d5fbdc830f7">scaleDetector</a> != null) {
<a name="l00155"></a>00155                                 <a class="code" href="classgraphview_1_1_graph_view.html#adff1b740a07c0dca98189d5fbdc830f7">scaleDetector</a>.<a class="code" href="classgraphview_1_1compatible_1_1_scale_gesture_detector.html#a08ca922b33a9ec497e684eee9c2028b0">onTouchEvent</a>(event);
<a name="l00156"></a>00156                                 handled = <a class="code" href="classgraphview_1_1_graph_view.html#adff1b740a07c0dca98189d5fbdc830f7">scaleDetector</a>.<a class="code" href="classgraphview_1_1compatible_1_1_scale_gesture_detector.html#ad84dfbb0bbdb658e69901c523f380247">isInProgress</a>();
<a name="l00157"></a>00157                         }
<a name="l00158"></a>00158                         <span class="keywordflow">if</span> (!handled) {
<a name="l00159"></a>00159                                 <span class="comment">// if not scaled, scroll</span>
<a name="l00160"></a>00160                                 <span class="keywordflow">if</span> ((event.getAction() &amp; MotionEvent.ACTION_DOWN) == MotionEvent.ACTION_DOWN) {
<a name="l00161"></a>00161                                         handled = <span class="keyword">true</span>;
<a name="l00162"></a>00162                                 }
<a name="l00163"></a>00163                                 <span class="keywordflow">if</span> ((event.getAction() &amp; MotionEvent.ACTION_UP) == MotionEvent.ACTION_UP) {
<a name="l00164"></a>00164                                         <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#ac8dfd841c554850efc69a003c9913341">lastTouchEventX</a> = 0;
<a name="l00165"></a>00165                                         handled = <span class="keyword">true</span>;
<a name="l00166"></a>00166                                 }
<a name="l00167"></a>00167                                 <span class="keywordflow">if</span> ((event.getAction() &amp; MotionEvent.ACTION_MOVE) == MotionEvent.ACTION_MOVE) {
<a name="l00168"></a>00168                                         <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#ac8dfd841c554850efc69a003c9913341">lastTouchEventX</a> != 0) {
<a name="l00169"></a>00169                                                 <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#a80d4ade40ed3cbf17963fff3a7350090">onMoveGesture</a>(event.getX() - <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#ac8dfd841c554850efc69a003c9913341">lastTouchEventX</a>);
<a name="l00170"></a>00170                                         }
<a name="l00171"></a>00171                                         <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html#ac8dfd841c554850efc69a003c9913341">lastTouchEventX</a> = <span class="keyword">event</span>.getX();
<a name="l00172"></a>00172                                         handled = <span class="keyword">true</span>;
<a name="l00173"></a>00173                                 }
<a name="l00174"></a>00174                         }
<a name="l00175"></a>00175                         <span class="keywordflow">return</span> handled;
<a name="l00176"></a>00176                 }
<a name="l00177"></a>00177         }
<a name="l00178"></a>00178 
<a name="l00182"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html">00182</a>         <span class="keyword">static</span> <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html">GraphViewData</a> {
<a name="l00183"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#a1c3566c49e3b6e6151e77683ce7572c9">00183</a>                 <span class="keyword">public</span> <span class="keyword">final</span> <span class="keywordtype">double</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#a1c3566c49e3b6e6151e77683ce7572c9">valueX</a>;
<a name="l00184"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#aa897034d2c3a80d6c163e4adcc58686d">00184</a>                 <span class="keyword">public</span> <span class="keyword">final</span> <span class="keywordtype">double</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#aa897034d2c3a80d6c163e4adcc58686d">valueY</a>;
<a name="l00185"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#a3b6c845df1527f1dbe003fa54d1df4c8">00185</a>                 <span class="keyword">public</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#a3b6c845df1527f1dbe003fa54d1df4c8">GraphViewData</a>(<span class="keywordtype">double</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#a1c3566c49e3b6e6151e77683ce7572c9">valueX</a>, <span class="keywordtype">double</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#aa897034d2c3a80d6c163e4adcc58686d">valueY</a>) {
<a name="l00186"></a>00186                         super();
<a name="l00187"></a>00187                         this.valueX = <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#a1c3566c49e3b6e6151e77683ce7572c9">valueX</a>;
<a name="l00188"></a>00188                         this.valueY = <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#aa897034d2c3a80d6c163e4adcc58686d">valueY</a>;
<a name="l00189"></a>00189                 }
<a name="l00190"></a>00190         }
<a name="l00191"></a>00191 
<a name="l00195"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html">00195</a>         <span class="keyword">static</span> <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html">GraphViewSeries</a> {
<a name="l00196"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a43bd2b023fde30e53d4497d83d4dc84d">00196</a>                 <span class="keyword">final</span> String <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a43bd2b023fde30e53d4497d83d4dc84d">description</a>;
<a name="l00197"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a473aa9c7c26484ae9810b16feffc82ae">00197</a>                 <span class="keyword">final</span> <span class="keywordtype">int</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a473aa9c7c26484ae9810b16feffc82ae">color</a>;
<a name="l00198"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a6cbcdf93dc7cf800febb90d098bedb17">00198</a>                 <span class="keyword">final</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html">GraphViewData</a>[] <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a6cbcdf93dc7cf800febb90d098bedb17">values</a>;
<a name="l00199"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a3b9f5593124620f456a036e5f7b6660f">00199</a>                 <span class="keyword">public</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a3b9f5593124620f456a036e5f7b6660f">GraphViewSeries</a>(<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html">GraphViewData</a>[] <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a6cbcdf93dc7cf800febb90d098bedb17">values</a>) {
<a name="l00200"></a>00200                         <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a43bd2b023fde30e53d4497d83d4dc84d">description</a> = null;
<a name="l00201"></a>00201                         <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a473aa9c7c26484ae9810b16feffc82ae">color</a> = 0xff0077cc; <span class="comment">// blue version</span>
<a name="l00202"></a>00202                         this.values = <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a6cbcdf93dc7cf800febb90d098bedb17">values</a>;
<a name="l00203"></a>00203                 }
<a name="l00204"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a1df4f2edb882a0afc931fcea5caaab1f">00204</a>                 <span class="keyword">public</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a1df4f2edb882a0afc931fcea5caaab1f">GraphViewSeries</a>(String <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a43bd2b023fde30e53d4497d83d4dc84d">description</a>, Integer <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a473aa9c7c26484ae9810b16feffc82ae">color</a>, <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html">GraphViewData</a>[] <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a6cbcdf93dc7cf800febb90d098bedb17">values</a>) {
<a name="l00205"></a>00205                         super();
<a name="l00206"></a>00206                         this.description = <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a43bd2b023fde30e53d4497d83d4dc84d">description</a>;
<a name="l00207"></a>00207                         <span class="keywordflow">if</span> (color == null) {
<a name="l00208"></a>00208                                 color = 0xff0077cc; <span class="comment">// blue version</span>
<a name="l00209"></a>00209                         }
<a name="l00210"></a>00210                         this.color = <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a473aa9c7c26484ae9810b16feffc82ae">color</a>;
<a name="l00211"></a>00211                         this.values = <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html#a6cbcdf93dc7cf800febb90d098bedb17">values</a>;
<a name="l00212"></a>00212                 }
<a name="l00213"></a>00213         }
<a name="l00214"></a>00214 
<a name="l00215"></a><a class="code" href="enumgraphview_1_1_graph_view_1_1_legend_align.html">00215</a>         <span class="keyword">public</span> <span class="keyword">enum</span> <a class="code" href="enumgraphview_1_1_graph_view_1_1_legend_align.html">LegendAlign</a> {
<a name="l00216"></a><a class="code" href="enumgraphview_1_1_graph_view_1_1_legend_align.html#ad813baa1a281191c8f998494e9a5b522">00216</a>                 <a class="code" href="enumgraphview_1_1_graph_view_1_1_legend_align.html#ad813baa1a281191c8f998494e9a5b522">TOP</a>, MIDDLE, BOTTOM
<a name="l00217"></a>00217         }
<a name="l00218"></a>00218 
<a name="l00219"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_ver_labels_view.html">00219</a>         <span class="keyword">private</span> <span class="keyword">class </span><a class="code" href="classgraphview_1_1_graph_view_1_1_ver_labels_view.html">VerLabelsView</a> <span class="keyword">extends</span> View {
<a name="l00223"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_ver_labels_view.html#ac51a0b19cdf55d3fab856937baea7714">00223</a>                 <span class="keyword">public</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_ver_labels_view.html#ac51a0b19cdf55d3fab856937baea7714">VerLabelsView</a>(Context context) {
<a name="l00224"></a>00224                         super(context);
<a name="l00225"></a>00225                         setLayoutParams(<span class="keyword">new</span> LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT, 10));
<a name="l00226"></a>00226                 }
<a name="l00227"></a>00227 
<a name="l00231"></a>00231                 @Override
<a name="l00232"></a><a class="code" href="classgraphview_1_1_graph_view_1_1_ver_labels_view.html#a3ed918ee4be92ba24697463711fa770e">00232</a>                 <span class="keyword">protected</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_ver_labels_view.html#a3ed918ee4be92ba24697463711fa770e">onDraw</a>(Canvas canvas) {
<a name="l00233"></a>00233                         <span class="comment">// normal</span>
<a name="l00234"></a>00234                         <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setStrokeWidth(0);
<a name="l00235"></a>00235 
<a name="l00236"></a>00236                         <span class="keywordtype">float</span> border = <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html">GraphViewConfig</a>.<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html#a142a28a70c5c65464717637b33f6252a">BORDER</a>;
<a name="l00237"></a>00237                         <span class="keywordtype">float</span> height = getHeight();
<a name="l00238"></a>00238                         <span class="keywordtype">float</span> graphheight = height - (2 * border);
<a name="l00239"></a>00239 
<a name="l00240"></a>00240                         <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a> == null) {
<a name="l00241"></a>00241                                 <a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a> = <a class="code" href="classgraphview_1_1_graph_view.html#a461bd90d6d23ffe2f2f8f2af9f9108fb">generateVerlabels</a>(graphheight);
<a name="l00242"></a>00242                         }
<a name="l00243"></a>00243 
<a name="l00244"></a>00244                         <span class="comment">// vertical labels</span>
<a name="l00245"></a>00245                         <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setTextAlign(Align.LEFT);
<a name="l00246"></a>00246                         <span class="keywordtype">int</span> vers = <a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a>.length - 1;
<a name="l00247"></a>00247                         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a>.length; i++) {
<a name="l00248"></a>00248                                 <span class="keywordtype">float</span> y = ((graphheight / vers) * i) + border;
<a name="l00249"></a>00249                                 <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setColor(Color.WHITE);
<a name="l00250"></a>00250                                 canvas.drawText(<a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a>[i], 0, y, <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>);
<a name="l00251"></a>00251                         }
<a name="l00252"></a>00252                 }
<a name="l00253"></a>00253         }
<a name="l00254"></a>00254 
<a name="l00255"></a><a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">00255</a>         <span class="keyword">protected</span> <span class="keyword">final</span> Paint <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>;
<a name="l00256"></a><a class="code" href="classgraphview_1_1_graph_view.html#a8e3d1831fdbbbb17329996a6db6834e3">00256</a>         <span class="keyword">private</span> String[] <a class="code" href="classgraphview_1_1_graph_view.html#a8e3d1831fdbbbb17329996a6db6834e3">horlabels</a>;
<a name="l00257"></a><a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">00257</a>         <span class="keyword">private</span> String[] <a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a>;
<a name="l00258"></a><a class="code" href="classgraphview_1_1_graph_view.html#a20903413edf006c4b5eafca915389f0e">00258</a>         <span class="keyword">private</span> String <a class="code" href="classgraphview_1_1_graph_view.html#a20903413edf006c4b5eafca915389f0e">title</a>;
<a name="l00259"></a><a class="code" href="classgraphview_1_1_graph_view.html#a4e5c1ae633db2db59ba447953a31aca6">00259</a>         <span class="keyword">private</span> <span class="keywordtype">boolean</span> <a class="code" href="classgraphview_1_1_graph_view.html#a4e5c1ae633db2db59ba447953a31aca6">scrollable</a>;
<a name="l00260"></a><a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">00260</a>         <span class="keyword">private</span> <span class="keywordtype">double</span> <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a>;
<a name="l00261"></a><a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">00261</a>         <span class="keyword">private</span> <span class="keywordtype">double</span> <a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">viewportSize</a>;
<a name="l00262"></a><a class="code" href="classgraphview_1_1_graph_view.html#ad76601c96b925b39020b1d0dac63561f">00262</a>         <span class="keyword">private</span> <span class="keyword">final</span> View <a class="code" href="classgraphview_1_1_graph_view.html#ad76601c96b925b39020b1d0dac63561f">viewVerLabels</a>;
<a name="l00263"></a><a class="code" href="classgraphview_1_1_graph_view.html#adff1b740a07c0dca98189d5fbdc830f7">00263</a>         <span class="keyword">private</span> <a class="code" href="classgraphview_1_1compatible_1_1_scale_gesture_detector.html">ScaleGestureDetector</a> <a class="code" href="classgraphview_1_1_graph_view.html#adff1b740a07c0dca98189d5fbdc830f7">scaleDetector</a>;
<a name="l00264"></a><a class="code" href="classgraphview_1_1_graph_view.html#a29f48e76fa74884851c00e2f134fa480">00264</a>         <span class="keyword">private</span> <span class="keywordtype">boolean</span> <a class="code" href="classgraphview_1_1_graph_view.html#a29f48e76fa74884851c00e2f134fa480">scalable</a>;
<a name="l00265"></a><a class="code" href="classgraphview_1_1_graph_view.html#a2f289e77512ee655bf8a3a39e9f91783">00265</a>         <span class="keyword">private</span> NumberFormat <a class="code" href="classgraphview_1_1_graph_view.html#a2f289e77512ee655bf8a3a39e9f91783">numberformatter</a>;
<a name="l00266"></a><a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">00266</a>         <span class="keyword">private</span> <span class="keyword">final</span> List&lt;GraphViewSeries&gt; <a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>;
<a name="l00267"></a><a class="code" href="classgraphview_1_1_graph_view.html#a13cba437e2313251e0cd99c71dae3273">00267</a>         <span class="keyword">private</span> <span class="keywordtype">boolean</span> <a class="code" href="classgraphview_1_1_graph_view.html#a13cba437e2313251e0cd99c71dae3273">showLegend</a> = <span class="keyword">false</span>;
<a name="l00268"></a><a class="code" href="classgraphview_1_1_graph_view.html#aacd751efaa20ed2a47a3c1aff97d7ab4">00268</a>         <span class="keyword">private</span> <span class="keywordtype">float</span> <a class="code" href="classgraphview_1_1_graph_view.html#aacd751efaa20ed2a47a3c1aff97d7ab4">legendWidth</a> = 120;
<a name="l00269"></a><a class="code" href="classgraphview_1_1_graph_view.html#a4f2c61f28b300a572ae8929d9a7dbba4">00269</a>         <span class="keyword">private</span> <a class="code" href="enumgraphview_1_1_graph_view_1_1_legend_align.html">LegendAlign</a> <a class="code" href="classgraphview_1_1_graph_view.html#a4f2c61f28b300a572ae8929d9a7dbba4">legendAlign</a> = <a class="code" href="enumgraphview_1_1_graph_view_1_1_legend_align.html">LegendAlign</a>.<a class="code" href="enumgraphview_1_1_graph_view_1_1_legend_align.html#a5a62d8bcf1764bccef3e4060cc22191f">MIDDLE</a>;
<a name="l00270"></a><a class="code" href="classgraphview_1_1_graph_view.html#a8e3052638243aba29a0e1070fdb10daf">00270</a>         <span class="keyword">private</span> <span class="keywordtype">boolean</span> <a class="code" href="classgraphview_1_1_graph_view.html#a8e3052638243aba29a0e1070fdb10daf">manualYAxis</a>;
<a name="l00271"></a><a class="code" href="classgraphview_1_1_graph_view.html#a1915568d9a55e29cd38062c097e6f294">00271</a>         <span class="keyword">private</span> <span class="keywordtype">double</span> <a class="code" href="classgraphview_1_1_graph_view.html#a1915568d9a55e29cd38062c097e6f294">manualMaxYValue</a>;
<a name="l00272"></a><a class="code" href="classgraphview_1_1_graph_view.html#aabf40daebffb0b3ea17e29fd4113c915">00272</a>         <span class="keyword">private</span> <span class="keywordtype">double</span> <a class="code" href="classgraphview_1_1_graph_view.html#aabf40daebffb0b3ea17e29fd4113c915">manualMinYValue</a>;
<a name="l00273"></a>00273 
<a name="l00279"></a><a class="code" href="classgraphview_1_1_graph_view.html#a69a910cf1dd181085e46b1ea5cefed79">00279</a>         <span class="keyword">public</span> <a class="code" href="classgraphview_1_1_graph_view.html#a69a910cf1dd181085e46b1ea5cefed79">GraphView</a>(Context context, String <a class="code" href="classgraphview_1_1_graph_view.html#a20903413edf006c4b5eafca915389f0e">title</a>) {
<a name="l00280"></a>00280                 super(context);
<a name="l00281"></a>00281                 setLayoutParams(<span class="keyword">new</span> LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
<a name="l00282"></a>00282 
<a name="l00283"></a>00283                 <span class="keywordflow">if</span> (title == null)
<a name="l00284"></a>00284                         title = <span class="stringliteral">&quot;&quot;</span>;
<a name="l00285"></a>00285                 <span class="keywordflow">else</span>
<a name="l00286"></a>00286                         this.title = <a class="code" href="classgraphview_1_1_graph_view.html#a20903413edf006c4b5eafca915389f0e">title</a>;
<a name="l00287"></a>00287 
<a name="l00288"></a>00288                 <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a> = <span class="keyword">new</span> Paint();
<a name="l00289"></a>00289                 <a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a> = <span class="keyword">new</span> ArrayList&lt;GraphViewSeries&gt;();
<a name="l00290"></a>00290 
<a name="l00291"></a>00291                 <a class="code" href="classgraphview_1_1_graph_view.html#ad76601c96b925b39020b1d0dac63561f">viewVerLabels</a> = <span class="keyword">new</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_ver_labels_view.html">VerLabelsView</a>(context);
<a name="l00292"></a>00292                 addView(viewVerLabels);
<a name="l00293"></a>00293                 addView(<span class="keyword">new</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_content_view.html">GraphViewContentView</a>(context), <span class="keyword">new</span> LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT, 1));
<a name="l00294"></a>00294         }
<a name="l00295"></a>00295 
<a name="l00296"></a><a class="code" href="classgraphview_1_1_graph_view.html#acb3611c6adeab5291ee5d6ca1b25f834">00296</a>         <span class="keyword">private</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html">GraphViewData</a>[] <a class="code" href="classgraphview_1_1_graph_view.html#acb3611c6adeab5291ee5d6ca1b25f834">_values</a>(<span class="keywordtype">int</span> idxSeries) {
<a name="l00297"></a>00297                 <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html">GraphViewData</a>[] values = <a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.get(idxSeries).values;
<a name="l00298"></a>00298                 <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a> == 0 &amp;&amp; <a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">viewportSize</a> == 0) {
<a name="l00299"></a>00299                         <span class="comment">// all data</span>
<a name="l00300"></a>00300                         <span class="keywordflow">return</span> values;
<a name="l00301"></a>00301                 } <span class="keywordflow">else</span> {
<a name="l00302"></a>00302                         <span class="comment">// viewport</span>
<a name="l00303"></a>00303                         List&lt;GraphViewData&gt; listData = <span class="keyword">new</span> ArrayList&lt;GraphViewData&gt;();
<a name="l00304"></a>00304                         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;values.length; i++) {
<a name="l00305"></a>00305                                 <span class="keywordflow">if</span> (values[i].valueX &gt;= <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a>) {
<a name="l00306"></a>00306                                         <span class="keywordflow">if</span> (values[i].valueX &gt; <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a>+<a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">viewportSize</a>) {
<a name="l00307"></a>00307                                                 listData.add(values[i]); <span class="comment">// one more for nice scrolling</span>
<a name="l00308"></a>00308                                                 <span class="keywordflow">break</span>;
<a name="l00309"></a>00309                                         } <span class="keywordflow">else</span> {
<a name="l00310"></a>00310                                                 listData.add(values[i]);
<a name="l00311"></a>00311                                         }
<a name="l00312"></a>00312                                 } <span class="keywordflow">else</span> {
<a name="l00313"></a>00313                                         <span class="keywordflow">if</span> (listData.isEmpty()) {
<a name="l00314"></a>00314                                                 listData.add(values[i]);
<a name="l00315"></a>00315                                         }
<a name="l00316"></a>00316                                         listData.set(0, values[i]); <span class="comment">// one before, for nice scrolling</span>
<a name="l00317"></a>00317                                 }
<a name="l00318"></a>00318                         }
<a name="l00319"></a>00319                         <span class="keywordflow">return</span> listData.toArray(<span class="keyword">new</span> <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html">GraphViewData</a>[listData.size()]);
<a name="l00320"></a>00320                 }
<a name="l00321"></a>00321         }
<a name="l00322"></a>00322 
<a name="l00323"></a><a class="code" href="classgraphview_1_1_graph_view.html#ad54b47eb7c021c0777e909b0d15413e7">00323</a>         <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#ad54b47eb7c021c0777e909b0d15413e7">addSeries</a>(<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html">GraphViewSeries</a> series) {
<a name="l00324"></a>00324                 <a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.add(series);
<a name="l00325"></a>00325         }
<a name="l00326"></a>00326 
<a name="l00327"></a><a class="code" href="classgraphview_1_1_graph_view.html#ab2b73dcc7823a09b550857b4d4265d45">00327</a>         <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#ab2b73dcc7823a09b550857b4d4265d45">removeSeries</a>(<span class="keywordtype">int</span> index)
<a name="l00328"></a>00328         {
<a name="l00329"></a>00329                 <span class="keywordflow">if</span> (index &lt; 0 || index &gt;= <a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.size())
<a name="l00330"></a>00330                 {
<a name="l00331"></a>00331                         <span class="keywordflow">throw</span> <span class="keyword">new</span> IndexOutOfBoundsException(<span class="stringliteral">&quot;No series at index &quot;</span> + index);
<a name="l00332"></a>00332                 }
<a name="l00333"></a>00333                 
<a name="l00334"></a>00334                 <a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.remove(index);
<a name="l00335"></a>00335         }
<a name="l00336"></a>00336         
<a name="l00337"></a><a class="code" href="classgraphview_1_1_graph_view.html#a33d5ba898dffc47a43b3fbdfa64fdee2">00337</a>         <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#ab2b73dcc7823a09b550857b4d4265d45">removeSeries</a>(<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_series.html">GraphViewSeries</a> series)
<a name="l00338"></a>00338         {
<a name="l00339"></a>00339                 <a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.remove(series);
<a name="l00340"></a>00340         }
<a name="l00341"></a>00341         
<a name="l00342"></a><a class="code" href="classgraphview_1_1_graph_view.html#a3030d5c910f0386b8c5b1d07f7749694">00342</a>         <span class="keyword">protected</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#a3030d5c910f0386b8c5b1d07f7749694">drawLegend</a>(Canvas canvas, <span class="keywordtype">float</span> height, <span class="keywordtype">float</span> width) {
<a name="l00343"></a>00343                 <span class="keywordtype">int</span> shapeSize = 15;
<a name="l00344"></a>00344 
<a name="l00345"></a>00345                 <span class="comment">// rect</span>
<a name="l00346"></a>00346                 <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setARGB(180, 100, 100, 100);
<a name="l00347"></a>00347                 <span class="keywordtype">float</span> legendHeight = (shapeSize+5)*<a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.size() +5;
<a name="l00348"></a>00348                 <span class="keywordtype">float</span> lLeft = width-<a class="code" href="classgraphview_1_1_graph_view.html#aacd751efaa20ed2a47a3c1aff97d7ab4">legendWidth</a> - 10;
<a name="l00349"></a>00349                 <span class="keywordtype">float</span> lTop;
<a name="l00350"></a>00350                 <span class="keywordflow">switch</span> (<a class="code" href="classgraphview_1_1_graph_view.html#a4f2c61f28b300a572ae8929d9a7dbba4">legendAlign</a>) {
<a name="l00351"></a>00351                 <span class="keywordflow">case</span> TOP:
<a name="l00352"></a>00352                         lTop = 10;
<a name="l00353"></a>00353                         <span class="keywordflow">break</span>;
<a name="l00354"></a>00354                 <span class="keywordflow">case</span> MIDDLE:
<a name="l00355"></a>00355                         lTop = height/2 - legendHeight/2;
<a name="l00356"></a>00356                         <span class="keywordflow">break</span>;
<a name="l00357"></a>00357                 <span class="keywordflow">default</span>:
<a name="l00358"></a>00358                         lTop = height - <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html">GraphViewConfig</a>.<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html#a142a28a70c5c65464717637b33f6252a">BORDER</a> - legendHeight -10;
<a name="l00359"></a>00359                 }
<a name="l00360"></a>00360                 <span class="keywordtype">float</span> lRight = lLeft+<a class="code" href="classgraphview_1_1_graph_view.html#aacd751efaa20ed2a47a3c1aff97d7ab4">legendWidth</a>;
<a name="l00361"></a>00361                 <span class="keywordtype">float</span> lBottom = lTop+legendHeight;
<a name="l00362"></a>00362                 canvas.drawRoundRect(<span class="keyword">new</span> RectF(lLeft, lTop, lRight, lBottom), 8, 8, <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>);
<a name="l00363"></a>00363 
<a name="l00364"></a>00364                 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;<a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.size(); i++) {
<a name="l00365"></a>00365                         <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setColor(<a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.get(i).color);
<a name="l00366"></a>00366                         canvas.drawRect(<span class="keyword">new</span> RectF(lLeft+5, lTop+5+(i*(shapeSize+5)), lLeft+5+shapeSize, lTop+((i+1)*(shapeSize+5))), <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>);
<a name="l00367"></a>00367                         <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.get(i).description != null) {
<a name="l00368"></a>00368                                 <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setColor(Color.WHITE);
<a name="l00369"></a>00369                                 <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>.setTextAlign(Align.LEFT);
<a name="l00370"></a>00370                                 canvas.drawText(<a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.get(i).description, lLeft+5+shapeSize+5, lTop+shapeSize+(i*(shapeSize+5)), <a class="code" href="classgraphview_1_1_graph_view.html#a36bb0610856b07bcf9018603a86b7e08">paint</a>);
<a name="l00371"></a>00371                         }
<a name="l00372"></a>00372                 }
<a name="l00373"></a>00373         }
<a name="l00374"></a>00374 
<a name="l00375"></a>00375         <span class="keyword">abstract</span> <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#a470fe04d7c98c94c35ea5375a7de9a17">drawSeries</a>(Canvas canvas, GraphViewData[] values, <span class="keywordtype">float</span> graphwidth, <span class="keywordtype">float</span> graphheight, <span class="keywordtype">float</span> border, <span class="keywordtype">double</span> minX, <span class="keywordtype">double</span> minY, <span class="keywordtype">double</span> diffX, <span class="keywordtype">double</span> diffY, <span class="keywordtype">float</span> horstart);
<a name="l00376"></a>00376 
<a name="l00384"></a><a class="code" href="classgraphview_1_1_graph_view.html#a49ec50b31a29ad08a6fd82ddc4782c57">00384</a>         <span class="keyword">protected</span> String <a class="code" href="classgraphview_1_1_graph_view.html#a49ec50b31a29ad08a6fd82ddc4782c57">formatLabel</a>(<span class="keywordtype">double</span> value, <span class="keywordtype">boolean</span> isValueX) {
<a name="l00385"></a>00385                 <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#a2f289e77512ee655bf8a3a39e9f91783">numberformatter</a> == null) {
<a name="l00386"></a>00386                         <a class="code" href="classgraphview_1_1_graph_view.html#a2f289e77512ee655bf8a3a39e9f91783">numberformatter</a> = NumberFormat.getNumberInstance();
<a name="l00387"></a>00387                         <span class="keywordtype">double</span> highestvalue = <a class="code" href="classgraphview_1_1_graph_view.html#a9e17e92e3a8ff90d95a5cfe4cdc66d25">getMaxY</a>();
<a name="l00388"></a>00388                         <span class="keywordtype">double</span> lowestvalue = <a class="code" href="classgraphview_1_1_graph_view.html#aab2766972f8d4f59dc697174fcd4e49d">getMinY</a>();
<a name="l00389"></a>00389                         <span class="keywordflow">if</span> (highestvalue - lowestvalue &lt; 0.1) {
<a name="l00390"></a>00390                                 <a class="code" href="classgraphview_1_1_graph_view.html#a2f289e77512ee655bf8a3a39e9f91783">numberformatter</a>.setMaximumFractionDigits(6);
<a name="l00391"></a>00391                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (highestvalue - lowestvalue &lt; 1) {
<a name="l00392"></a>00392                                 <a class="code" href="classgraphview_1_1_graph_view.html#a2f289e77512ee655bf8a3a39e9f91783">numberformatter</a>.setMaximumFractionDigits(4);
<a name="l00393"></a>00393                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (highestvalue - lowestvalue &lt; 20) {
<a name="l00394"></a>00394                                 <a class="code" href="classgraphview_1_1_graph_view.html#a2f289e77512ee655bf8a3a39e9f91783">numberformatter</a>.setMaximumFractionDigits(3);
<a name="l00395"></a>00395                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (highestvalue - lowestvalue &lt; 100) {
<a name="l00396"></a>00396                                 <a class="code" href="classgraphview_1_1_graph_view.html#a2f289e77512ee655bf8a3a39e9f91783">numberformatter</a>.setMaximumFractionDigits(1);
<a name="l00397"></a>00397                         } <span class="keywordflow">else</span> {
<a name="l00398"></a>00398                                 <a class="code" href="classgraphview_1_1_graph_view.html#a2f289e77512ee655bf8a3a39e9f91783">numberformatter</a>.setMaximumFractionDigits(0);
<a name="l00399"></a>00399                         }
<a name="l00400"></a>00400                 }
<a name="l00401"></a>00401                 <span class="keywordflow">return</span> <a class="code" href="classgraphview_1_1_graph_view.html#a2f289e77512ee655bf8a3a39e9f91783">numberformatter</a>.format(value);
<a name="l00402"></a>00402         }
<a name="l00403"></a>00403 
<a name="l00404"></a><a class="code" href="classgraphview_1_1_graph_view.html#aee71a390d7ad9c1a385dfd44027ed92f">00404</a>         <span class="keyword">private</span> String[] <a class="code" href="classgraphview_1_1_graph_view.html#aee71a390d7ad9c1a385dfd44027ed92f">generateHorlabels</a>(<span class="keywordtype">float</span> graphwidth) {
<a name="l00405"></a>00405                 <span class="keywordtype">int</span> numLabels = (int) (graphwidth/<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html">GraphViewConfig</a>.<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html#a9b1a2b01ca81fda50d10847bd23ca259">VERTICAL_LABEL_WIDTH</a>);
<a name="l00406"></a>00406                 String[] labels = <span class="keyword">new</span> String[numLabels+1];
<a name="l00407"></a>00407                 <span class="keywordtype">double</span> min = <a class="code" href="classgraphview_1_1_graph_view.html#a4b659a680581f1c98b18639744cc59ef">getMinX</a>(<span class="keyword">false</span>);
<a name="l00408"></a>00408                 <span class="keywordtype">double</span> max = <a class="code" href="classgraphview_1_1_graph_view.html#a43a2733e75e304a60650a2dcc9208d17">getMaxX</a>(<span class="keyword">false</span>);
<a name="l00409"></a>00409                 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;=numLabels; i++) {
<a name="l00410"></a>00410                         labels[i] = <a class="code" href="classgraphview_1_1_graph_view.html#a49ec50b31a29ad08a6fd82ddc4782c57">formatLabel</a>(min + ((max-min)*i/numLabels), <span class="keyword">true</span>);
<a name="l00411"></a>00411                 }
<a name="l00412"></a>00412                 <span class="keywordflow">return</span> labels;
<a name="l00413"></a>00413         }
<a name="l00414"></a>00414 
<a name="l00415"></a><a class="code" href="classgraphview_1_1_graph_view.html#a461bd90d6d23ffe2f2f8f2af9f9108fb">00415</a>         <span class="keyword">synchronized</span> <span class="keyword">private</span> String[] <a class="code" href="classgraphview_1_1_graph_view.html#a461bd90d6d23ffe2f2f8f2af9f9108fb">generateVerlabels</a>(<span class="keywordtype">float</span> graphheight) {
<a name="l00416"></a>00416                 <span class="keywordtype">int</span> numLabels = (int) (graphheight/<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html">GraphViewConfig</a>.<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_config.html#a51424eb091b33de68ee07bda8eae25de">HORIZONTAL_LABEL_HEIGHT</a>);
<a name="l00417"></a>00417                 String[] labels = <span class="keyword">new</span> String[numLabels+1];
<a name="l00418"></a>00418                 <span class="keywordtype">double</span> min = <a class="code" href="classgraphview_1_1_graph_view.html#aab2766972f8d4f59dc697174fcd4e49d">getMinY</a>();
<a name="l00419"></a>00419                 <span class="keywordtype">double</span> max = <a class="code" href="classgraphview_1_1_graph_view.html#a9e17e92e3a8ff90d95a5cfe4cdc66d25">getMaxY</a>();
<a name="l00420"></a>00420                 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;=numLabels; i++) {
<a name="l00421"></a>00421                         labels[numLabels-i] = <a class="code" href="classgraphview_1_1_graph_view.html#a49ec50b31a29ad08a6fd82ddc4782c57">formatLabel</a>(min + ((max-min)*i/numLabels), <span class="keyword">false</span>);
<a name="l00422"></a>00422                 }
<a name="l00423"></a>00423                 <span class="keywordflow">return</span> labels;
<a name="l00424"></a>00424         }
<a name="l00425"></a>00425 
<a name="l00426"></a><a class="code" href="classgraphview_1_1_graph_view.html#afa0deff673254c12506a52aef2b8d3f8">00426</a>         <span class="keyword">public</span> <a class="code" href="enumgraphview_1_1_graph_view_1_1_legend_align.html">LegendAlign</a> <a class="code" href="classgraphview_1_1_graph_view.html#afa0deff673254c12506a52aef2b8d3f8">getLegendAlign</a>() {
<a name="l00427"></a>00427                 <span class="keywordflow">return</span> <a class="code" href="classgraphview_1_1_graph_view.html#a4f2c61f28b300a572ae8929d9a7dbba4">legendAlign</a>;
<a name="l00428"></a>00428         }
<a name="l00429"></a>00429 
<a name="l00430"></a><a class="code" href="classgraphview_1_1_graph_view.html#acfd7096df33f77d3dd906b9b2b396be9">00430</a>         <span class="keyword">public</span> <span class="keywordtype">float</span> <a class="code" href="classgraphview_1_1_graph_view.html#acfd7096df33f77d3dd906b9b2b396be9">getLegendWidth</a>() {
<a name="l00431"></a>00431                 <span class="keywordflow">return</span> <a class="code" href="classgraphview_1_1_graph_view.html#aacd751efaa20ed2a47a3c1aff97d7ab4">legendWidth</a>;
<a name="l00432"></a>00432         }
<a name="l00433"></a>00433 
<a name="l00434"></a><a class="code" href="classgraphview_1_1_graph_view.html#a43a2733e75e304a60650a2dcc9208d17">00434</a>         <span class="keyword">private</span> <span class="keywordtype">double</span> <a class="code" href="classgraphview_1_1_graph_view.html#a43a2733e75e304a60650a2dcc9208d17">getMaxX</a>(<span class="keywordtype">boolean</span> ignoreViewport) {
<a name="l00435"></a>00435                 <span class="comment">// if viewport is set, use this</span>
<a name="l00436"></a>00436                 <span class="keywordflow">if</span> (!ignoreViewport &amp;&amp; <a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">viewportSize</a> != 0) {
<a name="l00437"></a>00437                         <span class="keywordflow">return</span> <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a>+<a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">viewportSize</a>;
<a name="l00438"></a>00438                 } <span class="keywordflow">else</span> {
<a name="l00439"></a>00439                         <span class="comment">// otherwise use the max x value</span>
<a name="l00440"></a>00440                         <span class="comment">// values must be sorted by x, so the last value has the largest X value</span>
<a name="l00441"></a>00441                         <span class="keywordtype">double</span> highest = 0;
<a name="l00442"></a>00442                         <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.size() &gt; 0)
<a name="l00443"></a>00443                         {
<a name="l00444"></a>00444                                 <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html">GraphViewData</a>[] values = <a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.get(0).values;
<a name="l00445"></a>00445                                 highest = values[values.length-1].<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#a1c3566c49e3b6e6151e77683ce7572c9">valueX</a>;
<a name="l00446"></a>00446                                 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=1; i&lt;<a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.size(); i++) {
<a name="l00447"></a>00447                                         values = <a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.get(i).values;
<a name="l00448"></a>00448                                         highest = Math.max(highest, values[values.length-1].<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#a1c3566c49e3b6e6151e77683ce7572c9">valueX</a>);
<a name="l00449"></a>00449                                 }
<a name="l00450"></a>00450                         }
<a name="l00451"></a>00451                         <span class="keywordflow">return</span> highest;
<a name="l00452"></a>00452                 }
<a name="l00453"></a>00453         }
<a name="l00454"></a>00454 
<a name="l00455"></a><a class="code" href="classgraphview_1_1_graph_view.html#a9e17e92e3a8ff90d95a5cfe4cdc66d25">00455</a>         <span class="keyword">private</span> <span class="keywordtype">double</span> <a class="code" href="classgraphview_1_1_graph_view.html#a9e17e92e3a8ff90d95a5cfe4cdc66d25">getMaxY</a>() {
<a name="l00456"></a>00456                 <span class="keywordtype">double</span> largest;
<a name="l00457"></a>00457                 <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#a8e3052638243aba29a0e1070fdb10daf">manualYAxis</a>) {
<a name="l00458"></a>00458                         largest = <a class="code" href="classgraphview_1_1_graph_view.html#a1915568d9a55e29cd38062c097e6f294">manualMaxYValue</a>;
<a name="l00459"></a>00459                 } <span class="keywordflow">else</span> {
<a name="l00460"></a>00460                         largest = Integer.MIN_VALUE;
<a name="l00461"></a>00461                         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;<a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.size(); i++) {
<a name="l00462"></a>00462                                 <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html">GraphViewData</a>[] values = <a class="code" href="classgraphview_1_1_graph_view.html#acb3611c6adeab5291ee5d6ca1b25f834">_values</a>(i);
<a name="l00463"></a>00463                                 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> ii=0; ii&lt;values.length; ii++)
<a name="l00464"></a>00464                                         <span class="keywordflow">if</span> (values[ii].valueY &gt; largest)
<a name="l00465"></a>00465                                                 largest = values[ii].<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#aa897034d2c3a80d6c163e4adcc58686d">valueY</a>;
<a name="l00466"></a>00466                         }
<a name="l00467"></a>00467                 }
<a name="l00468"></a>00468                 <span class="keywordflow">return</span> largest;
<a name="l00469"></a>00469         }
<a name="l00470"></a>00470 
<a name="l00471"></a><a class="code" href="classgraphview_1_1_graph_view.html#a4b659a680581f1c98b18639744cc59ef">00471</a>         <span class="keyword">private</span> <span class="keywordtype">double</span> <a class="code" href="classgraphview_1_1_graph_view.html#a4b659a680581f1c98b18639744cc59ef">getMinX</a>(<span class="keywordtype">boolean</span> ignoreViewport) {
<a name="l00472"></a>00472                 <span class="comment">// if viewport is set, use this</span>
<a name="l00473"></a>00473                 <span class="keywordflow">if</span> (!ignoreViewport &amp;&amp; <a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">viewportSize</a> != 0) {
<a name="l00474"></a>00474                         <span class="keywordflow">return</span> <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a>;
<a name="l00475"></a>00475                 } <span class="keywordflow">else</span> {
<a name="l00476"></a>00476                         <span class="comment">// otherwise use the min x value</span>
<a name="l00477"></a>00477                         <span class="comment">// values must be sorted by x, so the first value has the smallest X value</span>
<a name="l00478"></a>00478                         <span class="keywordtype">double</span> lowest = 0;
<a name="l00479"></a>00479                         <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.size() &gt; 0)
<a name="l00480"></a>00480                         {
<a name="l00481"></a>00481                                 <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html">GraphViewData</a>[] values = <a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.get(0).values;
<a name="l00482"></a>00482                                 lowest = values[0].<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#a1c3566c49e3b6e6151e77683ce7572c9">valueX</a>;
<a name="l00483"></a>00483                                 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=1; i&lt;<a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.size(); i++) {
<a name="l00484"></a>00484                                         values = <a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.get(i).values;
<a name="l00485"></a>00485                                         lowest = Math.min(lowest, values[0].valueX);
<a name="l00486"></a>00486                                 }
<a name="l00487"></a>00487                         }
<a name="l00488"></a>00488                         <span class="keywordflow">return</span> lowest;
<a name="l00489"></a>00489                 }
<a name="l00490"></a>00490         }
<a name="l00491"></a>00491 
<a name="l00492"></a><a class="code" href="classgraphview_1_1_graph_view.html#aab2766972f8d4f59dc697174fcd4e49d">00492</a>         <span class="keyword">private</span> <span class="keywordtype">double</span> <a class="code" href="classgraphview_1_1_graph_view.html#aab2766972f8d4f59dc697174fcd4e49d">getMinY</a>() {
<a name="l00493"></a>00493                 <span class="keywordtype">double</span> smallest;
<a name="l00494"></a>00494                 <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#a8e3052638243aba29a0e1070fdb10daf">manualYAxis</a>) {
<a name="l00495"></a>00495                         smallest = <a class="code" href="classgraphview_1_1_graph_view.html#aabf40daebffb0b3ea17e29fd4113c915">manualMinYValue</a>;
<a name="l00496"></a>00496                 } <span class="keywordflow">else</span> {
<a name="l00497"></a>00497                         smallest = Integer.MAX_VALUE;
<a name="l00498"></a>00498                         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;<a class="code" href="classgraphview_1_1_graph_view.html#a402045c2f740f957d2badce54361358c">graphSeries</a>.size(); i++) {
<a name="l00499"></a>00499                                 <a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html">GraphViewData</a>[] values = <a class="code" href="classgraphview_1_1_graph_view.html#acb3611c6adeab5291ee5d6ca1b25f834">_values</a>(i);
<a name="l00500"></a>00500                                 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> ii=0; ii&lt;values.length; ii++)
<a name="l00501"></a>00501                                         <span class="keywordflow">if</span> (values[ii].valueY &lt; smallest)
<a name="l00502"></a>00502                                                 smallest = values[ii].<a class="code" href="classgraphview_1_1_graph_view_1_1_graph_view_data.html#aa897034d2c3a80d6c163e4adcc58686d">valueY</a>;
<a name="l00503"></a>00503                         }
<a name="l00504"></a>00504                 }
<a name="l00505"></a>00505                 <span class="keywordflow">return</span> smallest;
<a name="l00506"></a>00506         }
<a name="l00507"></a>00507 
<a name="l00508"></a><a class="code" href="classgraphview_1_1_graph_view.html#a51e7d6a7ebf2c0883a75420be5c29284">00508</a>         <span class="keyword">public</span> <span class="keywordtype">boolean</span> <a class="code" href="classgraphview_1_1_graph_view.html#a51e7d6a7ebf2c0883a75420be5c29284">isScrollable</a>() {
<a name="l00509"></a>00509                 <span class="keywordflow">return</span> <a class="code" href="classgraphview_1_1_graph_view.html#a4e5c1ae633db2db59ba447953a31aca6">scrollable</a>;
<a name="l00510"></a>00510         }
<a name="l00511"></a>00511 
<a name="l00512"></a><a class="code" href="classgraphview_1_1_graph_view.html#a196e0c4dd00b0691316be6dc0ee3dd79">00512</a>         <span class="keyword">public</span> <span class="keywordtype">boolean</span> <a class="code" href="classgraphview_1_1_graph_view.html#a196e0c4dd00b0691316be6dc0ee3dd79">isShowLegend</a>() {
<a name="l00513"></a>00513                 <span class="keywordflow">return</span> <a class="code" href="classgraphview_1_1_graph_view.html#a13cba437e2313251e0cd99c71dae3273">showLegend</a>;
<a name="l00514"></a>00514         }
<a name="l00515"></a>00515 
<a name="l00520"></a><a class="code" href="classgraphview_1_1_graph_view.html#a0be82d6b80edcb637771c99f7818da10">00520</a>         <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#a0be82d6b80edcb637771c99f7818da10">setHorizontalLabels</a>(String[] <a class="code" href="classgraphview_1_1_graph_view.html#a8e3d1831fdbbbb17329996a6db6834e3">horlabels</a>) {
<a name="l00521"></a>00521                 this.horlabels = <a class="code" href="classgraphview_1_1_graph_view.html#a8e3d1831fdbbbb17329996a6db6834e3">horlabels</a>;
<a name="l00522"></a>00522         }
<a name="l00523"></a>00523 
<a name="l00524"></a><a class="code" href="classgraphview_1_1_graph_view.html#a09b45a208dc2c333d86ed3bff0d3ab92">00524</a>         <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#a09b45a208dc2c333d86ed3bff0d3ab92">setLegendAlign</a>(<a class="code" href="enumgraphview_1_1_graph_view_1_1_legend_align.html">LegendAlign</a> <a class="code" href="classgraphview_1_1_graph_view.html#a4f2c61f28b300a572ae8929d9a7dbba4">legendAlign</a>) {
<a name="l00525"></a>00525                 this.legendAlign = <a class="code" href="classgraphview_1_1_graph_view.html#a4f2c61f28b300a572ae8929d9a7dbba4">legendAlign</a>;
<a name="l00526"></a>00526         }
<a name="l00527"></a>00527 
<a name="l00528"></a><a class="code" href="classgraphview_1_1_graph_view.html#a2c6f4f8e6ef7719e709b54cd3768ad62">00528</a>         <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#a2c6f4f8e6ef7719e709b54cd3768ad62">setLegendWidth</a>(<span class="keywordtype">float</span> <a class="code" href="classgraphview_1_1_graph_view.html#aacd751efaa20ed2a47a3c1aff97d7ab4">legendWidth</a>) {
<a name="l00529"></a>00529                 this.legendWidth = <a class="code" href="classgraphview_1_1_graph_view.html#aacd751efaa20ed2a47a3c1aff97d7ab4">legendWidth</a>;
<a name="l00530"></a>00530         }
<a name="l00531"></a>00531 
<a name="l00537"></a><a class="code" href="classgraphview_1_1_graph_view.html#ab5b65b4555e17af954522e5302e1a40e">00537</a>         <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#ab5b65b4555e17af954522e5302e1a40e">setManualYAxis</a>(<span class="keywordtype">boolean</span> <a class="code" href="classgraphview_1_1_graph_view.html#a8e3052638243aba29a0e1070fdb10daf">manualYAxis</a>) {
<a name="l00538"></a>00538                 this.manualYAxis = <a class="code" href="classgraphview_1_1_graph_view.html#a8e3052638243aba29a0e1070fdb10daf">manualYAxis</a>;
<a name="l00539"></a>00539         }
<a name="l00540"></a>00540 
<a name="l00546"></a><a class="code" href="classgraphview_1_1_graph_view.html#a58afa645c92cc34a7b9b198668a3884b">00546</a>         <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#a58afa645c92cc34a7b9b198668a3884b">setManualYAxisBounds</a>(<span class="keywordtype">double</span> max, <span class="keywordtype">double</span> min) {
<a name="l00547"></a>00547                 <a class="code" href="classgraphview_1_1_graph_view.html#a1915568d9a55e29cd38062c097e6f294">manualMaxYValue</a> = max;
<a name="l00548"></a>00548                 <a class="code" href="classgraphview_1_1_graph_view.html#aabf40daebffb0b3ea17e29fd4113c915">manualMinYValue</a> = min;
<a name="l00549"></a>00549                 <a class="code" href="classgraphview_1_1_graph_view.html#a8e3052638243aba29a0e1070fdb10daf">manualYAxis</a> = <span class="keyword">true</span>;
<a name="l00550"></a>00550         }
<a name="l00551"></a>00551 
<a name="l00556"></a><a class="code" href="classgraphview_1_1_graph_view.html#aa31175889c2d53505c169f2d98e68916">00556</a>         <span class="keyword">synchronized</span> <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#aa31175889c2d53505c169f2d98e68916">setScalable</a>(<span class="keywordtype">boolean</span> <a class="code" href="classgraphview_1_1_graph_view.html#a29f48e76fa74884851c00e2f134fa480">scalable</a>) {
<a name="l00557"></a>00557                 this.scalable = <a class="code" href="classgraphview_1_1_graph_view.html#a29f48e76fa74884851c00e2f134fa480">scalable</a>;
<a name="l00558"></a>00558                 <span class="keywordflow">if</span> (scalable == <span class="keyword">true</span> &amp;&amp; <a class="code" href="classgraphview_1_1_graph_view.html#adff1b740a07c0dca98189d5fbdc830f7">scaleDetector</a> == null) {
<a name="l00559"></a>00559                         <a class="code" href="classgraphview_1_1_graph_view.html#a4e5c1ae633db2db59ba447953a31aca6">scrollable</a> = <span class="keyword">true</span>; <span class="comment">// automatically forces this</span>
<a name="l00560"></a>00560                         <a class="code" href="classgraphview_1_1_graph_view.html#adff1b740a07c0dca98189d5fbdc830f7">scaleDetector</a> = <span class="keyword">new</span> <a class="code" href="classgraphview_1_1compatible_1_1_scale_gesture_detector.html">ScaleGestureDetector</a>(getContext(), <span class="keyword">new</span> <a class="code" href="classgraphview_1_1compatible_1_1_scale_gesture_detector.html">ScaleGestureDetector</a>.SimpleOnScaleGestureListener() {
<a name="l00561"></a>00561                                 @Override
<a name="l00562"></a>00562                                 <span class="keyword">public</span> <span class="keywordtype">boolean</span> onScale(<a class="code" href="classgraphview_1_1compatible_1_1_scale_gesture_detector.html">ScaleGestureDetector</a> detector) {
<a name="l00563"></a>00563                                         <span class="keywordtype">double</span> newSize = <a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">viewportSize</a>*detector.<a class="code" href="classgraphview_1_1compatible_1_1_scale_gesture_detector.html#adf7b4ed8dfbc489a51832882442dcbdc">getScaleFactor</a>();
<a name="l00564"></a>00564                                         <span class="keywordtype">double</span> diff = newSize-<a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">viewportSize</a>;
<a name="l00565"></a>00565                                         <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a> += diff/2;
<a name="l00566"></a>00566                                         viewportSize -= diff;
<a name="l00567"></a>00567                                         <span class="keywordflow">if</span> (diff &lt; 0) {
<a name="l00568"></a>00568                                                 <span class="comment">// viewportStart must not be &lt; minX</span>
<a name="l00569"></a>00569                                                 <span class="keywordtype">double</span> minX = <a class="code" href="classgraphview_1_1_graph_view.html#a4b659a680581f1c98b18639744cc59ef">getMinX</a>(<span class="keyword">true</span>);
<a name="l00570"></a>00570                                                 <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a> &lt; minX) {
<a name="l00571"></a>00571                                                         <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a> = minX;
<a name="l00572"></a>00572                                                 }
<a name="l00573"></a>00573 
<a name="l00574"></a>00574                                                 <span class="comment">// viewportStart + viewportSize must not be &gt; maxX</span>
<a name="l00575"></a>00575                                                 <span class="keywordtype">double</span> maxX = <a class="code" href="classgraphview_1_1_graph_view.html#a43a2733e75e304a60650a2dcc9208d17">getMaxX</a>(<span class="keyword">true</span>);
<a name="l00576"></a>00576                                                 <span class="keywordtype">double</span> overlap = <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a> + viewportSize - maxX;
<a name="l00577"></a>00577                                                 <span class="keywordflow">if</span> (overlap &gt; 0) {
<a name="l00578"></a>00578                                                         <span class="comment">// scroll left</span>
<a name="l00579"></a>00579                                                         <span class="keywordflow">if</span> (<a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a>-overlap &gt; minX) {
<a name="l00580"></a>00580                                                                 <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a> -= overlap;
<a name="l00581"></a>00581                                                         } <span class="keywordflow">else</span> {
<a name="l00582"></a>00582                                                                 <span class="comment">// maximal scale</span>
<a name="l00583"></a>00583                                                                 <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a> = minX;
<a name="l00584"></a>00584                                                                 viewportSize = maxX - <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a>;
<a name="l00585"></a>00585                                                         }
<a name="l00586"></a>00586                                                 }
<a name="l00587"></a>00587                                         }
<a name="l00588"></a>00588                                         <a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a> = null;
<a name="l00589"></a>00589                                         <a class="code" href="classgraphview_1_1_graph_view.html#a8e3d1831fdbbbb17329996a6db6834e3">horlabels</a> = null;
<a name="l00590"></a>00590                                         <a class="code" href="classgraphview_1_1_graph_view.html#a2f289e77512ee655bf8a3a39e9f91783">numberformatter</a> = null;
<a name="l00591"></a>00591                                         invalidate();
<a name="l00592"></a>00592                                         <a class="code" href="classgraphview_1_1_graph_view.html#ad76601c96b925b39020b1d0dac63561f">viewVerLabels</a>.invalidate();
<a name="l00593"></a>00593                                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00594"></a>00594                                 }
<a name="l00595"></a>00595                         });
<a name="l00596"></a>00596                 }
<a name="l00597"></a>00597         }
<a name="l00598"></a>00598 
<a name="l00603"></a><a class="code" href="classgraphview_1_1_graph_view.html#ad0eaf333a71a70d937123d59031dc60f">00603</a>         <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#ad0eaf333a71a70d937123d59031dc60f">setScrollable</a>(<span class="keywordtype">boolean</span> <a class="code" href="classgraphview_1_1_graph_view.html#a4e5c1ae633db2db59ba447953a31aca6">scrollable</a>) {
<a name="l00604"></a>00604                 this.scrollable = <a class="code" href="classgraphview_1_1_graph_view.html#a4e5c1ae633db2db59ba447953a31aca6">scrollable</a>;
<a name="l00605"></a>00605         }
<a name="l00606"></a>00606 
<a name="l00607"></a><a class="code" href="classgraphview_1_1_graph_view.html#a04026af63c17fd39bd652b5c18787912">00607</a>         <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#a04026af63c17fd39bd652b5c18787912">setShowLegend</a>(<span class="keywordtype">boolean</span> <a class="code" href="classgraphview_1_1_graph_view.html#a13cba437e2313251e0cd99c71dae3273">showLegend</a>) {
<a name="l00608"></a>00608                 this.showLegend = <a class="code" href="classgraphview_1_1_graph_view.html#a13cba437e2313251e0cd99c71dae3273">showLegend</a>;
<a name="l00609"></a>00609         }
<a name="l00610"></a>00610 
<a name="l00615"></a><a class="code" href="classgraphview_1_1_graph_view.html#a48df0a71830ae1c1a2bc952946f6b01d">00615</a>         <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#a48df0a71830ae1c1a2bc952946f6b01d">setVerticalLabels</a>(String[] <a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a>) {
<a name="l00616"></a>00616                 this.verlabels = <a class="code" href="classgraphview_1_1_graph_view.html#ae148e510ef871e2ac34ac40e1449a906">verlabels</a>;
<a name="l00617"></a>00617         }
<a name="l00618"></a>00618 
<a name="l00624"></a><a class="code" href="classgraphview_1_1_graph_view.html#a6cba8403ffb15068537817c8bb1d5f1e">00624</a>         <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classgraphview_1_1_graph_view.html#a6cba8403ffb15068537817c8bb1d5f1e">setViewPort</a>(<span class="keywordtype">double</span> start, <span class="keywordtype">double</span> size) {
<a name="l00625"></a>00625                 <a class="code" href="classgraphview_1_1_graph_view.html#ac6db7f4e6eccbeb10c99ea6dd8a17d2d">viewportStart</a> = start;
<a name="l00626"></a>00626                 <a class="code" href="classgraphview_1_1_graph_view.html#a6913a26331059378ce2ca8b4ad8108b5">viewportSize</a> = size;
<a name="l00627"></a>00627         }
<a name="l00628"></a>00628 }
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Fri Jun 8 2012 00:07:22 for PhysiTrack by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
